using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Remove Overlap</para>
    /// <para>Removes overlap between two or more areas to form adjacent boundaries.</para>
    /// <para>删除两个或多个区域之间的重叠以形成相邻边界。</para>
    /// </summary>    
    [DisplayName("Remove Overlap")]
    public class RemoveOverlap : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RemoveOverlap()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features containing the overlapping polygons.</para>
        /// <para>包含重叠面的输入要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class containing the new trade area features.</para>
        /// <para>包含新贸易区要素的要素类。</para>
        /// </param>
        public RemoveOverlap(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Remove Overlap";

        public override string CallName => "ba.RemoveOverlap";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _method.GetGPValue(), _define_trade_area.GetGPValue(), _ring_id_field, _weight_field, _store_id, _in_stores_layer, _link_field];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features containing the overlapping polygons.</para>
        /// <para>包含重叠面的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class containing the new trade area features.</para>
        /// <para>包含新贸易区要素的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how the overlap between trade areas will be removed.</para>
        ///   <bulletList>
        ///     <bullet_item>Center Line— Overlap will be removed by creating a border that evenly distributes the area of intersection between polygons. This is the default.</bullet_item><para/>
        ///     <bullet_item>Thiessen— Overlap will be removed using straight lines to divide the area of intersection.</bullet_item><para/>
        ///     <bullet_item>Grid— Overlap will be removed by creating a grid of parallel lines used to define a natural division between polygons.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何消除贸易区域之间的重叠。</para>
        ///   <bulletList>
        ///     <bullet_item>中心线 - 通过创建均匀分布面之间相交区域的边框来消除重叠。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>Thiessen— 将使用直线除以划分相交区域来删除重叠。</bullet_item><para/>
        ///     <bullet_item>网格 - 通过创建平行线网格来消除重叠，该网格用于定义多边形之间的自然划分。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._CENTER_LINE;

        public enum _method_value
        {
            /// <summary>
            /// <para>Center Line</para>
            /// <para>Center Line— Overlap will be removed by creating a border that evenly distributes the area of intersection between polygons. This is the default.</para>
            /// <para>中心线 - 通过创建均匀分布面之间相交区域的边框来消除重叠。这是默认设置。</para>
            /// </summary>
            [Description("Center Line")]
            [GPEnumValue("CENTER_LINE")]
            _CENTER_LINE,

            /// <summary>
            /// <para>Thiessen</para>
            /// <para>Thiessen— Overlap will be removed using straight lines to divide the area of intersection.</para>
            /// <para>Thiessen— 将使用直线除以划分相交区域来删除重叠。</para>
            /// </summary>
            [Description("Thiessen")]
            [GPEnumValue("THIESSEN")]
            _THIESSEN,

            /// <summary>
            /// <para>Grid</para>
            /// <para>Grid— Overlap will be removed by creating a grid of parallel lines used to define a natural division between polygons.</para>
            /// <para>网格 - 通过创建平行线网格来消除重叠，该网格用于定义多边形之间的自然划分。</para>
            /// </summary>
            [Description("Grid")]
            [GPEnumValue("GRID")]
            _GRID,

        }

        /// <summary>
        /// <para>Define Trade Areas</para>
        /// <para><xdoc>
        ///   <para>Specifies whether ring overlap in a trade area will be removed.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Overlap will only be removed between polygons with equal values in the Ring ID Field parameter.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Overlap will be removed from all intersecting polygons. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否删除贸易区中的环重叠。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 仅在环 ID 字段参数中值相等的面之间移除重叠。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将从所有相交面中移除重叠。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Define Trade Areas")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _define_trade_area_value _define_trade_area { get; set; } = _define_trade_area_value._false;

        public enum _define_trade_area_value
        {
            /// <summary>
            /// <para>DEFINE_TRADE_AREA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DEFINE_TRADE_AREA")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_DEFINE_TRADE_AREA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_DEFINE_TRADE_AREA")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Ring ID Field</para>
        /// <para>A field from the input that defines common trade areas. Overlap between polygons will only be removed if their values in this field are equal.</para>
        /// <para>输入中定义常见贸易区域的字段。仅当多边形在此字段中的值相等时，才会删除多边形之间的重叠。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ring ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _ring_id_field { get; set; } = null;


        /// <summary>
        /// <para>Weight Field</para>
        /// <para>A field from the input used to influence removal of overlap based on its values.</para>
        /// <para>输入中的字段，用于根据其值影响重叠的删除。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _weight_field { get; set; } = null;


        /// <summary>
        /// <para>Input Feature Store ID Field</para>
        /// <para>A unique ID field in the stores feature layer.</para>
        /// <para>商店要素图层中的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_id { get; set; } = null;


        /// <summary>
        /// <para>Stores</para>
        /// <para>The input features containing the center points for the overlapping trade areas.</para>
        /// <para>包含重叠贸易区域中心点的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Stores")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_stores_layer { get; set; } = null;


        /// <summary>
        /// <para>Associated Store ID Field</para>
        /// <para>A unique ID field representing a store or facility location.</para>
        /// <para>表示商店或设施位置的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Associated Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _link_field { get; set; } = null;


        public RemoveOverlap SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}